package com.zhentao.file.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/*
 *云计算
 *魏子纹
 *2025/6/10
 */
@EnableConfigurationProperties(MinioconfigProperties.class)
public class MinioConfig {
    @Autowired
    MinioconfigProperties minioconfigProperties;
    @Bean
    public MinioClient buidMinioClient(){
        return MinioClient.builder()
                .credentials(minioconfigProperties.getAccessKey(),minioconfigProperties.getSecretKey())
                .endpoint(minioconfigProperties.getEndpoint())
                .build();
    }
}
